package com.ktjy.springthymeleaf.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @return 13141
 * 2025/7/11
 * 14:30
 */
@Data
@TableName("sys_user")
public class User implements Serializable {
    @TableId(type = IdType.AUTO)
    @TableField("usr_id")
    private Long usrId;
    @TableField("usr_name")
    private String usrName;
    @TableField("usr_password")
    private String usrPassword;
    @TableField("usr_role_id")
    private Long usrRoleId;
    private Integer usrFlag;
    @Version
    private Integer version;
    private Boolean deleted;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
    // @TableField("isMarried")
    // private Boolean isMarried;
    // @TableField("concat")
    // private String concat;
    @TableField(exist = false)
    private String roleName;

    // 构造方法
    public User() {
    }
    public User(String usrName, String usrPassword, Long usrRoleId, Integer usrFlag) {
        this.usrName = usrName;
        this.usrPassword = usrPassword;
        this.usrRoleId = usrRoleId;
        this.usrFlag = usrFlag;
    }
    public User(Long usrId, String usrName, String usrPassword, Long usrRoleId, Integer usrFlag, Integer version, Boolean deleted, Date createTime, Date updateTime) {
        this.usrId = usrId;
        this.usrName = usrName;
        this.usrPassword = usrPassword;
        this.usrRoleId = usrRoleId;
        this.usrFlag = usrFlag;
        this.version = version;
        this.deleted = deleted;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
}
